package com.battery.system.service.battery.impl;

import java.util.List;

import com.battery.system.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.battery.system.mapper.DevApplyItemsMapper;
import com.battery.system.domain.DevApplyItems;
import com.battery.system.service.battery.IDevApplyItemsService;
import com.battery.common.core.text.Convert;

/**
 * 设备申领明细Service业务层处理
 *
 * @author battery
 * @date 2021-01-22
 */
@Service
public class DevApplyItemsServiceImpl extends BaseServiceImpl<DevApplyItems> implements IDevApplyItemsService {


    @Autowired
    private DevApplyItemsMapper devApplyItemsMapper;

    /**
     * 查询设备申领明细
     *
     * @param id 设备申领明细ID
     * @return 设备申领明细
     */
    @Override
    public DevApplyItems selectDevApplyItemsById(String id) {
        return devApplyItemsMapper.selectDevApplyItemsById(id);
    }

    /**
     * 查询设备申领明细列表
     *
     * @param devApplyItems 设备申领明细
     * @return 设备申领明细
     */
    @Override
    public List<DevApplyItems> selectDevApplyItemsList(DevApplyItems devApplyItems) {
        return devApplyItemsMapper.selectDevApplyItemsList(devApplyItems);
    }

    /**
     * 新增设备申领明细
     *
     * @param devApplyItems 设备申领明细
     * @return 结果
     */
    @Override
    public int insertDevApplyItems(DevApplyItems devApplyItems) {
        return devApplyItemsMapper.insertDevApplyItems(devApplyItems);
    }

    /**
     * 修改设备申领明细
     *
     * @param devApplyItems 设备申领明细
     * @return 结果
     */
    @Override
    public int updateDevApplyItems(DevApplyItems devApplyItems) {
        return devApplyItemsMapper.updateDevApplyItems(devApplyItems);
    }

    /**
     * 删除设备申领明细对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteDevApplyItemsByIds(String ids) {
        return devApplyItemsMapper.deleteDevApplyItemsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除设备申领明细信息
     *
     * @param id 设备申领明细ID
     * @return 结果
     */
    @Override
    public int deleteDevApplyItemsById(String id) {
        return devApplyItemsMapper.deleteDevApplyItemsById(id);
    }
}
